package com.sky.mapper;

import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *  Setmeal_Dish
 */
@Mapper
public interface SetmealDishMapper {

    /**
     * 批量插入套餐菜品数据
     * @param setmealDishList
     */
    void insertBatch(List<SetmealDish> setmealDishList);

    /**
     * 更新套餐菜品数据
     * @param setmeal
     */
    void update(Setmeal setmeal);

    /**
     * 删除套餐菜品数据
     * @param ids
     */
    // delete from setmeal_dish where setmeal_id in (1,2,3)
    void deleteSetmealDish(List<Long> ids);

    /**
     * 根据套餐id查询菜品数据
     * @param id
     * @return
     */
    //@Select("select * from setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> getBySetmealId(Long id);

}
